package ace.cmp.data.methodname.method.name.sql.test.core.util;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * @author caspar
 * @date 2023/2/23 13:48
 */
public final class MethodUtils {

  public static Method getMethodByMethodNameAndClass(Class cls, String methodName) {
    return Arrays.stream(cls.getMethods())
        .filter(p -> p.getName().equals(methodName))
        .findFirst()
        .get();
  }
}
